﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Avatar.Model;
using AvatarHelper;

public partial class PersonInterviewNotice : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            using (var _adc = DBHelper.GetDataContext())
            {
                var _ivID=Request.QueryString["id"]!=null?Convert.ToInt32(Request.QueryString["id"].ToString()):0;
                var _interview = _adc.InterViewRecord.FirstOrDefault(i => i.ID == _ivID);
                if (_interview != null)
                {
                    lbl_From.Text = _interview.CompanyInformation.CompanyName;
                    lbl_Content.Text = _interview.Content;
                    lbl_Location.Text = _interview.Location;
                    var _contact = _interview.CompanyInformation.CompanyContact.FirstOrDefault();
                    if (_contact != null)
                    {
                        lbl_Address.Text = _contact.Address;
                        lbl_Tel.Text = _contact.Tel;
                    }
                }
            }
        }
    }
}
